{extend name="public/base"}
{block name="style"}{/block}
{block name="breadcrumb2" title="当前位置"}{/block}
//正文区域
{block name="body"}
<div class="page-container ">
<!--    <div class="text-c">
        <form class="Huiform" method="post" action="" target="_self">
            <input type="text" class="input-text" style="width:250px" placeholder="权限名称" id="" name="">
            <button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜权限节点</button>
        </form>
    </div>-->
    <div class="cl pd-5 bg-1 bk-gray mb-10">
    <span class="l">


<!--     <button onClick="list_add()" class="btn btn-primary radius" type="button">
        <i class="Hui-iconfont">&#xe600;</i> 添加
    </button>

    <button onClick="list_batch_edit()" class="btn btn-secondary radius" type="button">
        <i class="Hui-iconfont">&#xe647;</i> 修改
    </button>

    <button onClick="list_batch_del()" class="btn btn-danger  radius" type="button">
        <i class="Hui-iconfont">&#xe6e2;</i> 删除
    </button>

    <span style=" line-height:30px; color:#CCCCCC; margin-left:10px;">双击可编辑数据</span> -->

    </span> 
    <span class="l ml-20">

    我可以申请的流程
<!--         <form class="Huiform" method="get" action="" >
            <span class="select-box" style="width:150px;">
                            <select class="select valid" size="1" name="group">
                                    <option value="0"> --全部-- </option>
{volist name="[]" id="select_name"}
                            <option value="{$key}" {eq name="key" value="$group"}selected{/eq}>{$select_name}</option>
{/volist}

                            </select>
            </span>
            <input type="text" class="input-text" style="width:250px" placeholder="权限名称"  name="name" value="{$name | default = "" }">
            <button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> GO </button>
        </form> -->
    </span>
    
    <span class="r ml-20">
<!--         <button onClick="location.replace(location.href)" class="btn btn-success radius" type="button">
        <i class="Hui-iconfont">&#xe68f;</i> 刷新
        </button> -->
    </span>
    
    </div>
    <form class="Huiform" method="get" action="" id="listForm">
    <table class="table table-border table-bordered table-bg table-tr-hover">
        <thead>
            <tr>
                <th width="25">
                    <input type="checkbox" name="" value="">
                </th>
                <th width="40"  class="text-c">ID</th>
                <th >流程名字</th>
                <th >流程描述</th>
                <th >印章</th>
                <th >印章机位置</th>
                <th >状态</th>

                <th width="100">操作</th>
            </tr>
        </thead>
        <tbody>
{volist name="list" id="vo"}
            <tr>
                
                <td><input type="checkbox" value="{$vo.id}" name="id[]">{$vo.id}</td>
                <td  class="text-c">{$vo.id}</td>
                <td>{$vo.name}</td>
                <td>{$vo.mark}</td>
                <td>[ {$vo.seal_id} ] {$vo.seal.seal_name} </td>
                <td>{$vo.seal.equipment.equipment_address} </td>
                <td>{$vo.status_text}</td>

                <td>

                <button onClick="list_add({$vo.id})" type="button" class="btn btn-secondary size-MINI radius" title=" 创建申请">
                    <i class="Hui-iconfont">&#xe6df;</i> 创建申请
                </button>



                </td>
{/volist}
            </tr>
        </tbody>
    </table>
    </form>
    <div class="pagination-wraper cl">
        {$list->render()}
    </div>
</div>
{/block}
<!--请在下方写此页面业务相关的脚本-->
//-----------------------------------------------------------------------------------------------
{block name="script"}

<script type="text/javascript">


var $listForm = $('#listForm'); // form#listForm
var add_url ='{:url('newApply')}';

/*行内 编辑*/
function list_add(id){
    var title = '修改数据';
    var url = add_url + '?process_id=' + id ; 
    layer_show_full(title,url);
}



$(function(){
    //双击修改
    $listForm.find('tbody tr').on('dblclick',function(e){
        console.log( e.target.nodeName );
        if(e.target.nodeName == 'INPUT' ){return false;}
        if(e.target.nodeName == 'BUTTON' ){return false;}
        if(e.target.nodeName == 'A' ){return false;}
        var id = $(this).find('[name^=id]').val();
        list_add(id);
    });

});//$(function(){



</script>

<style>
	

	
</style>



{/block}{//---------------------------------------------------------------------------}